User plane rerouting method and apparatus

ABSTRACT

Embodiments of this application provide a user plane rerouting method and apparatus. The method includes: a first network element receives user plane rerouting trigger information sent by a second network element, where the user plane rerouting trigger information is sent when the second network element detects a preset service packet that matches a packet detection rule PDR, and the PDR is used to indicate matching information and an execution rule that are corresponding to the preset service packet triggering user plane rerouting. The first network element further performs the user plane rerouting based on the user plane rerouting trigger information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2020/098561, filed on Jun. 28, 2020, which claims priority toChinese Patent Application No. 201910578953.9, filed on Jun. 28, 2019.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of this application relate to the field of networktechnologies, and in particular, to a user plane rerouting method andapparatus.

BACKGROUND

In a 5th generation (5G) network architecture, a 5G core network controlplane and a 5G core network user plane exchange messages through acorresponding interface, to deliver user policies from the control planeto the user plane and perform processing, for example, reporting eventsfrom the user plane to the control plane. In practice, a user plane pathmay need to be changed.

In a related technology, an application function (AF) entity initiates auser plane path change request to trigger a policy control function(PCF) entity to notify a session management function (SMF) entity toreconfigure a user plane path for a user plane function (UPF) entitythrough a network exposure function (NEF) entity and a unified datarepository (UDR) function entity.

However, in the related technology, a service triggering pathAF→NEF→UDR→PCF→SMF is implemented with a lot of services involved. Inaddition, the AF is a function entity planned on a third-partyapplication (APP), and falls out of a control scope of an operator. Toimplement proper path planning, the operator needs to open internalservice planning of the operator's network to the third-party APPthrough the NEF. This results in security problems.

SUMMARY

Embodiments of this application provide a user plane rerouting methodand apparatus. This improves operator network security.

According to a first aspect, an embodiment of this application providesa user plane rerouting method. The method includes:

a first network element receives user plane rerouting triggerinformation sent by a second network element, where the user planererouting trigger information is sent when the second network elementdetects a preset service packet that matches a packet detection rule(PDR), and the PDR is used to indicate matching information and anexecution rule that are corresponding to the preset service packettriggering user plane rerouting; and the first network element performsthe user plane rerouting based on the user plane rerouting triggerinformation.

In the user plane rerouting method according to the first aspect, theuser plane rerouting trigger information sent by the second networkelement is received by the first network element, where the user planererouting trigger information is sent when the second network elementdetects the preset service packet that matches the packet detection rule(PDR), and the PDR is used to indicate the matching information and theexecution rule that are corresponding to the preset service packettriggering the user plane rerouting. The first network element furtherperforms the user plane rerouting based on the user plane reroutingtrigger information. It can be learned that compared with a manner oftriggering a user plane path change by using a function entity plannedon a non-operator third-party APP in the related technology, in thisembodiment of this application, a network element within a control scopeof an operator can adjust a user plane path based on service awareness,and a function entity planned on a third-party APP does not need totrigger a user plane path change. This improves operator networksecurity.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR), where the PDI isused to indicate the matching information corresponding to the presetservice packet, and the URR is used to indicate the execution rulecorresponding to the preset service packet.

In a possible implementation, the method further includes:

the first network element generates the PDR according to a preset policyused to trigger the user plane rerouting, and sends the PDR to thesecond network element.

In a possible implementation, the method further includes:

the first network element obtains, from a third network element, apreset policy that is in the third network element and that is used totrigger the user plane rerouting; and

the first network element generates the PDR according to the presetpolicy and sends the PDR to the second network element.

In a possible implementation, the method further includes:

the first network element sends an activation message to the secondnetwork element, where the activation message is used to indicate toactivate a preset PDR in the second network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message sent by the first network element to the secondnetwork element, and the first session creation request message is usedto indicate to create a session between the first network element andthe second network element.

In a possible implementation, the activation message is carried in asecond session creation request message sent by the first networkelement to the second network element, and the second session creationrequest message is used to indicate to create a session between thefirst network element and the second network element.

In a possible implementation, that the first network element performsthe user plane rerouting based on the user plane rerouting triggerinformation includes:

the first network element sends a first session request message to afourth network element and a second session request message to a fifthnetwork element, where the first session request message is used toindicate to create or update a session between the first network elementand the fourth network element, the second session request message isused to indicate to create or update a session between the first networkelement and the fifth network element, and the second session requestmessage carries a service packet traffic steering rule allocated to thefifth network element; and/or

the first network element sends a session update request message to thesecond network element, where the session update request message is usedto indicate to update the PDR in the second network element.

In a possible implementation, that the first network element performsthe user plane rerouting based on the user plane rerouting triggerinformation includes:

the first network element creates a session with a fourth networkelement; and

the first network element deletes the session with the second networkelement.

In a possible implementation, that the first network element creates asession with a fourth network element includes:

the first network element sends a third session creation request messageto the fourth network element, where the third session creation requestmessage is used to indicate to create the session between the firstnetwork element and the fourth network element.

In a possible implementation, that the first network element deletes thesession with the second network element includes:

the first network element sends a session delete request message to thesecond network element, where the session delete request message is usedto indicate to delete the session between the first network element andthe second network element.

In a possible implementation, before the first network element performsthe user plane rerouting based on the user plane rerouting triggerinformation, the method further includes:

the first network element sends the user plane rerouting triggerinformation to the third network element; and

the first network element receives indication information sent by thethird network element, where the indication information is used toindicate the first network element to perform the user plane rerouting.

According to a second aspect, an embodiment of this application providesa user plane rerouting method. The method includes:

a first network element monitors a service packet according to a packetdetection rule (PDR), where the PDR is used to indicate matchinginformation and an execution rule that are corresponding to a presetservice packet triggering user plane rerouting; and

if the first network element detects the preset service packet thatmatches the PDR, the first network element sends user plane reroutingtrigger information to a second network element according to theexecution rule.

In the user plane rerouting method according to the second aspect, thefirst network element monitors the service packet according to thepacket detection rule (PDR). If the first network element detects thepreset service packet that matches the PDR, the first network elementsends the user plane rerouting trigger information to the second networkelement according to the execution rule, so that the second networkelement performs the user plane rerouting based on the user planererouting trigger information. It can be learned that, compared with amanner of triggering a user plane path change by using a function entityplanned on a non-operator third-party APP in the related technology, inthis embodiment of this application, a network element within a controlscope of an operator can adjust a user plane path based on serviceawareness, and a function entity planned on a third-party APP does notneed to trigger a user plane path change. This improves operator networksecurity.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR). The PDI is used toindicate the matching information corresponding to the preset servicepacket. The URR is used to indicate the execution rule corresponding tothe preset service packet.

In a possible implementation, that a first network element monitors aservice packet according to a packet detection rule (PDR) includes:

the first network element determines attribute information of theservice packet;

the first network element matches the attribute information with thePDI;

if the attribute information matches the PDI, the service packetdetected by the first network element is the preset service packet thatmatches the PDR; and/or

if the attribute information does not match the PDI, the service packetdetected by the first network element is not the preset service packetthat matches the PDR.

In a possible implementation, the method further includes:

the first network element receives the PDR sent by the second networkelement, where the PDR is generated by the second network elementaccording to a preset policy used to trigger the user plane rerouting,or the PDR is generated after the second network element obtains apolicy used to trigger the user plane rerouting from a third networkelement.

In a possible implementation, the method further includes:

the first network element receives an activation message sent by thesecond network element, where the activation message is used to indicateto activate the preset PDR in the first network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message received by the first network element from thesecond network element, where the first session creation request messageis used to indicate to create a session between the second networkelement and the first network element.

In a possible implementation, the activation message is carried in asecond session creation request message received by the first networkelement from the second network element, where the second sessioncreation request message is used to indicate to create a session betweenthe second network element and the first network element.

In a possible implementation, the method further includes:

the first network element receives a session update request message sentby the second network element, where the session update request messageis used to indicate to update the PDR in the first network element.

In a possible implementation, the method further includes:

the first network element receives a session delete request message sentby the second network element, where the session delete request messageis used to indicate to delete the session between the second networkelement and the first network element.

According to a third aspect, an embodiment of this application providesa network element, and the network element is a first network element.The first network element includes:

a first receiving module, configured to receive user plane reroutingtrigger information sent by a second network element, where the userplane rerouting trigger information is sent when the second networkelement detects a preset service packet that matches a packet detectionrule (PDR), and the PDR is used to indicate matching information and anexecution rule that are corresponding to the preset service packettriggering the user plane rerouting; and

a rerouting module, configured to perform the user plane rerouting basedon the user plane rerouting trigger information.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR). The PDI is used toindicate the matching information corresponding to the preset servicepacket. The URR is used to indicate the execution rule corresponding tothe preset service packet.

In a possible implementation, the first network element furtherincludes:

a first generation module, configured to generate the PDR according to apreset policy used to trigger the user plane rerouting; and

a first sending module, configured to send the PDR to the second networkelement.

In a possible implementation, the first network element furtherincludes:

an obtaining module, configured to obtain a preset policy, from a thirdnetwork element, that is in a third network element and that is used totrigger the user plane rerouting;

a second generation module, configured to generate the PDR according tothe policy; and

a second sending module, configured to send the PDR to the secondnetwork element.

In a possible implementation, the first network element furtherincludes:

a third sending module, configured to send an activation message to thesecond network element, where the activation message is used to indicateto activate the preset PDR in the second network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message sent by the first network element to the secondnetwork element, and the first session creation request message is usedto indicate to create a session between the first network element andthe second network element.

In a possible implementation, the activation message is carried in asecond session creation request message sent by the first networkelement to the second network element, and the second session creationrequest message is used to indicate to create a session between thefirst network element and the second network element.

In a possible implementation, the rerouting module is specificallyconfigured to:

send a first session request message to a fourth network element and asecond session request message to a fifth network element, where thefirst session request message is used to indicate to create or update asession between the first network element and the fourth networkelement, the second session request message is used to indicate tocreate or update a session between the first network element and thefifth network element, and the second session request message carries aservice packet traffic steering rule allocated to the fifth networkelement; and/or

send a session update request message to the second network element,where the session update request message is used to indicate to updatethe PDR in the second network element.

In a possible implementation, the rerouting module includes:

a creation unit, configured to create the session with the fourthnetwork element; and

a deletion unit, configured to delete the session with the secondnetwork element.

In a possible implementation, the creation unit is specificallyconfigured to:

send a third session creation request message to the fourth networkelement, where the third session creation request message is used toindicate to create the session between the first network element and thefourth network element.

In a possible implementation, the deletion unit is specificallyconfigured to:

send a session delete request message to the second network element,where the session delete request message is used to indicate to deletethe session between the first network element and the second networkelement.

In a possible implementation, the first network element furtherincludes:

a fourth sending module, configured to send the user plane reroutingtrigger information to the third network element; and

a second receiving module, configured to receive indication informationsent by the third network element, where the indication information isused to indicate the first network element to perform the user planererouting.

According to a fourth aspect, an embodiment of this application providesa network element, and the network element is a first network element.The first network element includes:

a monitoring module, configured to monitor a service packet according toa packet detection rule (PDR), where the PDR is used to indicatematching information and an execution rule that are corresponding to apreset service packet triggering user plane rerouting; and

a sending module, configured to send user plane rerouting triggerinformation to a second network element according to the execution rulewhen the monitoring module detects the preset service packet thatmatches the PDR.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR). The PDI is used toindicate the matching information corresponding to the preset servicepacket. The URR is used to indicate the execution rule corresponding tothe preset service packet.

In a possible implementation, the monitoring module is specificallyconfigured to:

determine attribute information of the service packet;

match the attribute information with the PDI;

if the attribute information matches the PDI, detect that the servicepacket is the preset service packet that matches the PDR; and/or

if the attribute information does not match the PDI, detect that theservice packet is not the preset service packet that matches the PDR.

In a possible implementation, the first network element furtherincludes:

a first receiving module, configured to receive the PDR sent by thesecond network element, where the PDR is generated by the second networkelement according to a preset policy used to trigger the user planererouting, or the PDR is generated after the second network elementobtains a policy used to trigger the user plane rerouting from a thirdnetwork element.

In a possible implementation, the first network element furtherincludes:

a second receiving module, configured to receive an activation messagesent by the second network element, where the activation message is usedto indicate to activate the preset PDR in the first network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message received by the first network element from thesecond network element, and the first session creation request messageis used to indicate to create a session between the second networkelement and the first network element.

In a possible implementation, the activation message is carried in asecond session creation request message received by the first networkelement from the second network element, and the second session creationrequest message is used to indicate to create a session between thesecond network element and the first network element.

In a possible implementation, the first network element furtherincludes:

a third receiving module, configured to receive a session update requestmessage sent by the second network element, where the session updaterequest message is used to indicate to update the PDR in the firstnetwork element.

In a possible implementation, the first network element furtherincludes:

a fourth receiving module, configured to receive a session deleterequest message sent by the second network element, where the sessiondelete request message is used to indicate to delete the session betweenthe second network element and the first network element.

According to a fifth aspect, an embodiment of this application providesa network element, including a processor and a memory.

The memory is configured to store program instructions.

The processor is configured to invoke and execute the programinstructions stored in the memory, and when the processor executes theprogram instructions stored in the memory, the network element isconfigured to perform the method according to any one of theimplementations of the first aspect or the second aspect.

According to a sixth aspect, an embodiment of this application providesa computer-readable storage medium. The computer-readable storage mediumstores instructions, and when the instructions are run on a computer,the computer is enabled to perform the method according to any one ofthe implementations of the first aspect or the second aspect.

According to a seventh aspect, an embodiment of this applicationprovides a chip system. The chip system includes a processor and mayfurther include a memory, and is configured to implement the methodaccording to any one of the implementations of the first aspect or thesecond aspect. The chip system may include a chip, or may include a chipand another discrete component.

According to an eighth aspect, an embodiment of this applicationprovides a program. When executed by a processor, the program isconfigured to perform the method according to any one of theimplementations of the first aspect or the second aspect.

According to a ninth aspect, an embodiment of this application providesa computer program product including instructions. When the computerprogram product runs on a computer, the computer is enabled to performthe method according to any one of the implementations of the firstaspect or the second aspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram 1 depicting an architecture of a 5Gnetwork according to an embodiment of this application;

FIG. 2 is a schematic diagram 2 depicting an architecture of a 5Gnetwork according to an embodiment of this application;

FIG. 3 is a schematic diagram depicting a user plane architecture ofuplink packet traffic steering according to the related technology;

FIG. 4 is a schematic diagram depicting a user plane architecture of amulti-homed PDU session according to the related technology;

FIG. 5 is a schematic flowchart depicting that an AF triggers user planererouting according to the related technology;

FIG. 6 is a schematic flowchart of a user plane rerouting methodaccording to an embodiment of this application;

FIG. 7A and FIG. 7B are a schematic flowchart of a user plane reroutingmethod according to another embodiment of this application;

FIG. 8A and FIG. 8B are a schematic flowchart of a user plane reroutingmethod according to another embodiment of this application;

FIG. 9A, FIG. 9B, and FIG. 9C are a schematic flowchart of a user planererouting method according to another embodiment of this application;

FIG. 10 is a schematic diagram depicting a structure of a networkelement according to an embodiment of this application;

FIG. 11 is a schematic diagram depicting a structure of a networkelement according to another embodiment of this application; and

FIG. 12 is a schematic diagram depicting a structure of a networkelement according to another embodiment of this application.

DESCRIPTION OF EMBODIMENTS

Network architectures and some terms related to embodiments of thisapplication are first explained and described.

FIG. 1 is a schematic diagram 1 depicting an architecture of a 5Gnetwork according to an embodiment of this application. As shown in FIG.1, a control plane network element in the 5G network architectureprovides external service interfaces. A 5G core network control planeand a 5G core network user plane exchange messages through acorresponding service interface, to deliver user policies from thecontrol plane to the user plane and perform processing, for example,reporting events from the user plane to the control plane.

For example, a network slice selection function (NSSF) entity providesan external service interface Nnssf, an NEF provides an external serviceinterface Nnef, a network repository function (NRF) entity provides anexternal service interface Nnrf, a PCF provides a service interfaceNpcf, a unified data management (UDM) provides an external serviceinterface Nudm, an AF provides an external service interface Naf, anauthentication server function (AUSF) entity provides an externalservice interface Nausf, an access and mobility management function(AMF) entity provides an external service interface Namf, and an SMFprovides an external service interface Nsmf. In addition, a terminal isconnected to the AMF through an N1 interface, the AMF is connected to anaccess network (AN) through an N2 interface, the AN is connected to aUPF through an N3 interface, the UPF is connected to the SMF through anN4 interface, and the UPF is connected to a data network (DN) through anN6 interface.

FIG. 2 is a schematic diagram 2 depicting an architecture of a 5Gnetwork according to an embodiment of this application. As shown in FIG.2, two network elements that need to be interconnected in the 5G networkarchitecture have a one-to-one defined inter-NE interface. A 5G corenetwork control plane and a 5G core network user plane exchange messagesthrough a corresponding inter-NE interface, to deliver user policiesfrom the control plane to the user plane and perform processing, forexample, reporting events from the user plane to the control plane.

For example, N1 is an inter-NE interface between a terminal and an AMF,N2 is an inter-NE interface between an AN and the AMF, N3 is an inter-NEinterface between the AN and a UPF, N4 is an inter-NE interface betweenthe UPF and an SMF, N5 is an inter-NE interface between a PCF and an AF,N6 is an inter-NE interface between the UPF and a DN, N7 is an inter-NEinterface between the SMF and the PCF, N8 is an inter-NE interfacebetween the AMF and a UDM, N9 is an inter-NE interface between UPFs, N10is an inter-NE interface between the UDM and the SMF, N11 is an inter-NEinterface between the AMF and the SMF, N12 is an inter-NE interfacebetween the AMF and an AUSF, N13 is an inter-NE interface between theAUSF and the UDM, N14 is an inter-NE interface between AMFs, N15 is aninter-NE interface between the AMF and the PCF, and N22 is an inter-NEinterface between an NSSF and the AMF.

A scenario in which a protocol data unit (PDU) session may supportmultiple PDU session anchors (PSAs) is defined in the relatedtechnology. FIG. 3 is a schematic diagram depicting a user planearchitecture of uplink packet traffic steering according to the relatedtechnology. As shown in FIG. 3, uplink packet traffic steering (UplinkClassifier, ULCL)-UPF is added for an Internet protocol version 4 (IPv4)session and a non-multi-homed (Multi-home) Internet protocol version 6(IPv6) session, to perform traffic steering processing on a singlesession with multiple service paths. For example, the traffic steeringprocessing may be performed by a PSA-UPF1 and a PSA-UPF2.

FIG. 4 is a schematic diagram depicting a user plane architecture of amulti-homed PDU session according to the related technology. As shown inFIG. 4, a branch node (Branch Point, BP)-UPF of a multi-homed IPv6session is added to implement traffic steering processing on a singlesession with multiple service paths. For example, a PSA-UPF1 and aPSA-UPF2 may perform the traffic steering processing.

FIG. 5 is a schematic flowchart depicting that an AF triggers user planererouting according to the related technology. As shown in FIG. 5, theAF in the related technology may sense a terminal that accesses servicesof the AF and location information of the terminal. The AF initiates auser plane path change request, and an NEF and a UDR trigger a PCF tonotify an SMF to reconfigure a user plane path of a UPF. For example,the AF creates an AF request and sends the AF request to the NEF, sothat the NEF saves the AF request in the UDR, where the AF request mayinclude but is not limited to the following: a creation message, anupdate message, or a delete message. Further, because the PCF hassubscribed to an AF request change notification service from the UDR,the UDR sends a notification message to the PCF, so that the PCF sends apolicy control update notification message to the SMF, and the SMFreconfigures the user plane path of the UPF. Therefore, the user planepath is switched to a server closest to the terminal.

However, in the related technology, a service triggering pathAF→NEF→UDR→PCF→SMF is implemented with a plurality of services involved.In addition, the AF is a function entity planned on a third-party APP,and falls out of a control scope of an operator. To implement properpath planning, the operator needs to open internal service planning ofthe operator's network to the third-party APP through the NEF. Thisresults in security problems.

According to a user plane rerouting method and apparatus provided in theembodiments of this application, a second network element within thecontrol scope of the operator monitors a service packet according to aPDR, and sends user plane rerouting trigger information to a firstnetwork element when detecting a preset service packet matching the PDR.In this way, the first network element may learn, based on the receiveduser plane rerouting trigger information, that a terminal is accessingthe preset service packet triggering user plane rerouting, and furtherperform the user plane rerouting. It can be learned that, compared witha manner of triggering a user plane path change by using a functionentity planned on a non-operator third-party APP in the relatedtechnology, in this embodiment of this application, a network elementwithin the control scope of the operator can adjust a user plane pathbased on service awareness, and the function entity planned on thethird-party APP does not need to trigger a user plane path change. Thisimproves operator network security.

In this application, “at least one” refers to one or more, and “aplurality of” refers to two or more. The term “and/or” describes anassociation relationship for describing associated objects andrepresents that three relationships may exist. For example, A and/or Bmay represent the following cases: Only A exists, both A and B exist,and only B exists, where A and B may be singular or plural. Thecharacter “I” generally indicates an “or” relationship between theassociated objects. “At least one of the following items (pieces)” or asimilar expression thereof means any combination of the items, includingany combination of one item (piece) or a plurality of items (pieces).For example, at least one of a, b, or c may represent: a, b, c, a and b,a and c, b and c, or a, b, and c, where a, b, and c may be singular orplural.

Specific embodiments are used below to describe in detail the technicalsolutions in this application. The following several specificembodiments may be combined with each other, and a same or similarconcept or process may not be described repeatedly in some embodiments.

FIG. 6 is a schematic flowchart of a user plane rerouting methodaccording to an embodiment of this application. As shown in FIG. 6, themethod in this embodiment of this application may include the followingsteps.

Step S601: A second network element monitors a service packet accordingto a packet detection rule (PDR), where the PDR is used to indicatematching information and an execution rule that are corresponding to apreset service packet triggering user plane rerouting.

For example, the second network element in this embodiment of thisapplication may be a source anchor PSA-UPF1 corresponding to an initialsession of a terminal.

The preset service packet in this embodiment of this application is apacket corresponding to a preset service triggering the user planererouting. For example, the preset service may include but is notlimited to the following: an access service occurring in a preset serverInternet protocol (IP) address segment, or an access service occurringon a preset application or an APP.

The PDR in this embodiment of this application may include but is notlimited to the following: packet detection information (PDI) and a usagereporting rule (URR). The PDR may further include a QoS enforcement rule(QER) and/or a forwarding action rule (FAR).

For example, the PDI is used to indicate the matching informationcorresponding to the preset service packet. For example, the PDI mayinclude but is not limited to the following: a fully qualified tunnelendpoint identifier (F-TEID) of the preset packet, a source destinationport, a source destination IP address, an IP protocol type, and anapplication identity document (ID).

For example, the URR, the QoS execution rule, and/or the FAR are allused to indicate the execution rule corresponding to the preset servicepacket.

Optionally, when receiving any service packet in this step, the secondnetwork element first determines attribute information of the servicepacket. For example, the attribute information of the service packet mayinclude but is not limited to the following: an F-TEID, a sourcedestination port, a source destination IP address, an IP protocol type,and an application ID of the service packet. Then, the second networkelement compares and matches the attribute information with the PDI. Ifthe attribute information of the service packet matches the PDI, thesecond network element detects that the service packet is the presetservice packet matching the PDR. If the attribute information of theservice packet does not match the PDI, the second network elementdetects that the service packet is not the preset service packetmatching the PDR.

For example, it is assumed that the PDI includes the F-TEID, the sourcedestination port, the source destination IP address, and the IP protocoltype of the preset packet. It is assumed that the attribute informationof the service packet includes the F-TEID, the source destination port,the source destination IP address, and the IP protocol type of theservice packet. If the F-TEID of the service packet is the same as theF-TEID of the preset packet, the source destination port of the servicepacket is the same as the source and destination port of the presetpacket, the source destination IP addresses of the service packet is thesame as the source destination IP address of the preset packet, and theIP protocol type of the service packet is the same as the IP protocoltype of the preset packet, the second network element determines thatthe attribute information of the service packet matches the PDI, todetect that the service packet is the preset service packet matching thePDR. Otherwise (for example, the F-TEID of the service packet isdifferent from the F-TEID of the preset packet, the source anddestination ports of the service packet is different from the sourcedestination port of the preset packet, the source destination IP addressof the service packet is different from the source destination IPaddress of the preset packet, or the IP protocol type of the servicepacket is different from the IP protocol type of the preset packet), thesecond network element determines that the attribute information of theservice packet does not match the PDI, to detect that the service packetis not the preset service packet matching the PDR.

The following embodiment of this application describes manners ofobtaining the PDR in the second network element.

In a possible implementation, the first network element generates thePDR according to a preset policy used to trigger the user planererouting, and sends the PDR to the second network element.Correspondingly, the second network element receives the PDR sent by thefirst network element.

For example, the first network element in this embodiment of thisapplication may be an SMF.

The preset policy used to trigger the user plane rerouting in thisembodiment of this application may include but is not limited to any oneof the following:

a policy in which when accessing the preset service, the terminal needsto select a specific UPF as a UPF performing traffic steering to insertsession information, select another specific UPF as a new local anchorto create new session information, and deliver, to the UPF performingtraffic steering, an indication used to indicate to separatelydistribute a service flow (including a plurality of service packets) byusing a source anchor and the new local anchor;

a policy in which when accessing the preset service, the terminal needsto select the specific UPF as the new local anchor to create the newsession information and delete session information of the source anchor;

a policy in which if a content delivery network (CDN) server is deployedwithin a first preset distance range of the new local anchor, theservice flow of the preset service may be distributed by using the newlocal anchor, so that the CDN server can be directly accessed to improvequality of service and service access efficiency; or

a policy in which if a vehicle server is deployed in a DN networkcorresponding to the new local anchor within a second preset distancerange of a self-driving vehicle, when accessing a preset service, aterminal in the self-driving vehicle may access a service by using thenew local anchor.

In this implementation, the policy used to trigger the user planererouting is preset on the first network element, and the first networkelement may generate the PDR according to the preset policy, and thensend the generated PDR to the second network element. For example, thePDR may be carried in a first session creation request message sent bythe first network element to the second network element, and the firstsession creation request message is used to indicate to create a sessionbetween the first network element and the second network element.Certainly, the PDR may further be carried in another message (forexample, a session update request message or the like) sent by the firstnetwork element to the second network element.

In another possible implementation, the first network element obtains,from a third network element, a policy that is preset on the thirdnetwork element and that is used to trigger the user plane rerouting.The first network element generates the PDR according to the policy, andsends the PDR to the second network element. Correspondingly, the secondnetwork element receives the PDR sent by the first network element.

For example, the third network element in this embodiment of thisapplication may be a PCF.

In this implementation, the policy used to trigger the user planererouting is preset on the third network element. The first networkelement may obtain, from the third network element, the policy preset onthe third network element, generate the PDR according to the obtainedpolicy, and send the generated PDR to the second network element. Forexample, the PDR may be carried in the first session creation requestmessage sent by the first network element to the second network element.Certainly, the PDR may further be carried in another message (forexample, the session update request message or the like) sent by thefirst network element to the second network element.

In another possible implementation, the first network element sends anactivation message to the second network element, where the activationmessage is used to indicate to activate a PDR preset on the secondnetwork element. Correspondingly, the second network element receivesthe activation message sent by the first network element.

In this implementation, the PDR is preset on the second network element,and the first network element activates the preset PDR preset on thesecond network element by sending the activation message to the secondnetwork element. For example, the activation message may be carried in asecond session creation request message sent by the first networkelement to the second network element, and the second session creationrequest message is used to indicate to create the session between thesecond network element and the first network element. Certainly, theactivation message may further be carried in another message (forexample, the session update request message or the like) sent by thefirst network element to the second network element.

Step S602: If the second network element detects the preset servicepacket that matches the PDR, the second network element sends user planererouting trigger information to the first network element according tothe execution rule.

In this step, if the second network element detects the preset servicepacket that matches the PDR, the second network element sends the userplane rerouting trigger information to the first network elementaccording to the execution rule in the PDR. In this way, the firstnetwork element may learn, based on the user plane rerouting triggerinformation, that the terminal is accessing the preset service packettriggering the user plane rerouting and further perform the user planererouting.

Step S603: The first network element receives the user plane reroutingtrigger information sent by the second network element.

In this step, the first network element receives the user planererouting trigger information sent by the second network element, tolearn that the terminal is accessing the preset service packet thattriggers the user plane rerouting, where the user plane reroutingtrigger information is sent by the second network element when thesecond network element detects the preset service packet that matchesthe packet detection rule (PDR).

Step S604: The first network element performs the user plane reroutingbased on the user plane rerouting trigger information.

In this step, the first network element performs user plane reroutingoperations based on the user plane rerouting trigger information.Specifically, performing the user plane rerouting operations may includebut is not limited to the following several implementations.

In a possible implementation, the first network element sends a firstsession request message to a fourth network element and a second sessionrequest message to a fifth network element, where the first sessionrequest message is used to indicate to create or update a sessionbetween the first network element and the fourth network element, thesecond session request message is used to indicate to create or update asession between the first network element and the fifth network element,and the second session request message carries a service packet trafficsteering rule allocated to the fifth network element; and/or

the first network element sends the session update request message tothe second network element, where the session update request message isused to indicate to update the PDR in the second network element.Correspondingly, the second network element receives the session updaterequest message sent by the first network.

For example, the fourth network element in this embodiment of thisapplication may be a new local anchor PSA-UPF2 corresponding to a newsession of the terminal.

For example, for an IPv4 session and/or a non-multi-homed IPv6 session,the fifth network element in this embodiment of this application may bea ULCL-UPF. For a multi-homed IPv6 session, the fifth network element inthis embodiment of this application may be a BP-UPF.

In this implementation, the first network element sends, to the fourthnetwork element, the first session request message that is used toindicate to create or update the session between the first networkelement and the fourth network element, and sends, to a fifth networkelement, the second session request message that is used to indicate tocreate or update the session between the first network element and thefifth network element. The second session request message may furthercarry the service packet traffic steering rule allocated to the fifthnetwork element, so that the fifth network element distributes theservice packet according to the service packet traffic steering rule.

It should be noted that, if the first network element has created thesession between the first network element and the fourth networkelement, the first session request message is used to indicate to updatethe session between the first network element and the fourth networkelement. If the first network element has not created the sessionbetween the first network element and the fourth network element, thefirst session request message is used to indicate to create the sessionbetween the first network element and the fourth network element; and/orif the first network element has created the session between the firstnetwork element and the fifth network element, the second sessionrequest message is used to indicate to update the session between thefirst network element and the fifth network element. If the firstnetwork element has not created the session between the first networkelement and the fifth network element, the second session requestmessage is used to indicate to create the session between the firstnetwork element and the fifth network element.

In this implementation, the first network element may further send thesession update request message to the second network element.Correspondingly, the second network element receives the session updaterequest message sent by the first network. The session update requestmessage is used to indicate to update the PDR in the second networkelement.

For example, the session update request message may be used to indicateto update interface tunnel information carried in an FAR action of anoriginal PDR to interface tunnel information between the second networkelement and the fifth network element (for example, an interface addressand/or an F-TEID).

Optionally, if the PDR in the second network element is generated by thefirst network element after the first network element obtains, from thethird network element, the policy used to trigger the user planererouting, and the PDR is sent to the second network element. Therefore,before performing the user plane rerouting based on the user planererouting triggering information, the first network element first sendsthe user plane rerouting trigger information to the third networkelement, so that the third network element sends, to the first networkelement and according to the preset policy used to trigger the userplane rerouting, indication information used to indicate the firstnetwork element to perform the user plane rerouting. Then, the firstnetwork element receives the indication information sent by the thirdnetwork element.

In another possible implementation, the first network element createsthe session with the fourth network element, and deletes the sessionwith the second network element.

For example, the first network element may send, to the fourth networkelement, a third session creation request message used to indicate tocreate a session between the first network element and the fourthnetwork element. Correspondingly, after receiving the third sessioncreation request message sent by the first network element, the fourthnetwork element may further send, to the first network element, asession creation response message corresponding to the third sessioncreation request message, to create the session between the firstnetwork element and the fourth network element.

For example, the first network element may send, to the second networkelement, a session delete request message used to indicate to delete thesession between the first network element and the second networkelement. Correspondingly, after receiving the session delete requestmessage sent by the first network element, the second network elementmay further send, to the first network element, a session deleteresponse message corresponding to the session delete request message, todelete the session between the first network element and the secondnetwork element.

In this embodiment of this application, the second network elementmonitors the service packet according to the packet detection rule(PDR). If the second network element detects the preset service packetthat matches the PDR, the second network element sends the user planererouting trigger information to the first network element according tothe execution rule. The first network element further performs the userplane rerouting based on the received user plane rerouting triggerinformation. Compared with a manner of triggering a user plane pathchange by using a function entity planned on a non-operator third-partyAPP in the related technology, in this embodiment of this application,the second network element within a control scope of an operatormonitors the service packet according to the PDR, and sends the userplane rerouting trigger information to the first network element whendetecting the preset service packet matching the PDR. In this way, thefirst network element may learn, based on the received user planererouting trigger information, that the terminal is accessing the presetservice packet triggering the user plane rerouting, and further performthe user plane rerouting. It can be learned that, in this embodiment ofthis application, a network element within the control scope of theoperator can adjust a user plane path based on service awareness, andthe function entity planned on the third-party APP does not need totrigger the user plane path change. This improves operator networksecurity.

FIG. 7A and FIG. 7B are a schematic flowchart of a user plane reroutingmethod according to another embodiment of this application. Based on theforegoing embodiment, this embodiment of this application describes auser plane rerouting method by using an example in which a PSA-UPF1monitors a service packet according to a PDR delivered by an SMF andsends user plane rerouting trigger information to the SMF when detectinga preset service packet matching the PDR, so that the SMF performs userplane rerouting operations of creating a session between a UPFperforming traffic steering and a PSA-UPF2 and delivering a servicepacket traffic steering rule, and the like.

In this embodiment of this application, a policy used to trigger userplane rerouting is preset on the SMF. For example, when accessing apreset service, a terminal needs to select a specific UPF as the UPFperforming traffic steering to insert session information and anotherspecific UPF as a new local anchor PSA-UPF2 to create new sessioninformation, and deliver, to the UPF performing traffic steering, apolicy used to indicate to separately distribute a service flow(including a plurality of service packets) by using a source anchorPSA-UPF1 and the new local anchor PSA-UPF2, and the like.

In this embodiment, the SMF may generate a corresponding PDR accordingto the preset policy, where the PDR may include but is not limited to:PDI and a URR.

For example, for an IPv4 session and/or a non-multi-homed IPv6 session,the UPF performing traffic steering in this embodiment of thisapplication may be a ULCL-UPF. For a multi-homed IPv6 session, the UPFperforming traffic steering in this embodiment of this application maybe a BP-UPF.

As shown in FIG. 7A and FIG. 7B, the method in this embodiment of thisapplication may include the following steps.

Step S701: The terminal sends a session creation request message to theSMF.

Step S702: The SMF sends a session creation request message 1 to thePSA-UPF1, where the session creation request message 1 is used toindicate to create a session between the SMF and the PSA-UPF1.

For example, the session creation request message 1 carries the PDRgenerated by the SMF according to the preset policy, and the PDR mayinclude but is not limited to: the PDI and the URR.

TABLE 1 A schematic table showing a structure of URR informationelements (Information Elements, IE) in the session creation requestmessage 1 Octets 1 and 2 Create URR IE type = 6 (decimal) Octets 3 and 4Length = n Optional Interface IE or mandatory Condition Sxa Sxb Sxc N4IE type URR ID Mandatory This IE uniquely X X X X URR ID identifies asession usage reporting rule. Measurement Mandatory This IE indicates aX X X X Measurement method method for method measuring network resourceusage. For example, whether to measure by volume, time, volume and time,or event. Reporting Mandatory This IE indicates to X X X X Reportingtriggers trigger reporting triggers the network resource usage to acontrol plane function entity, for example, periodic reporting, usagereaching a preset threshold, or envelope closure.

As shown in Table 1, the reporting triggers are added to the URRinformation elements, to indicate to trigger reporting the networkresource usage to the control plane (CP) function entity. A specificformat of the reporting triggers may be shown in Table 2. When bit7-RERT (rerouting service) of octet 6 is set to 1, it indicates that areporting request is sent when a rerouting service flow is detected.

TABLE 2 A schematic table showing a structure of reporting triggers BitOctets 8 7 6 5 4 3 2 1 1 to 2 Type = 37 (decimal) 3 to 4 Length = n 5LIUSA DROTH STOPT START QUHTI TIMTH VOLTH PERIO 6 Spare RERT EVEQU EVETHMACAR ENVCL TIMQU VOLQU 7 to These octets exist only when explicitlyspecified. (n + 4)

An octet 5 may be encoded as follows:

Bit 1—periodic reporting (PERM): When the bit is set to 1, it indicatesa periodic report is reported;

Bit 2—volume threshold (VOLTH): When the bit is set to 1, it indicatesthat a report is reported when data usage reaches a volume threshold;

Bit 3—time threshold (TIMTH): When the bit is set to 1, it indicatesthat a report is reported when time usage reaches the time threshold;

Bit 4—quota holding time (QUHTI): When the bit is set to 1, it indicatesthat a report is reported when no data packet is received within a timeperiod exceeding the quota holding time;

Bit 5—start of traffic (START): When the bit is set to 1, it indicatesthat a report is reported when a service data flow (SDF) is detected oran application service is started;

Bit 6—stop of traffic (STOPT): When the bit is set to 1, it indicatesthat a report is reported when the SDF is detected or the applicationservice is stopped;

Bit 7—dropped downlink traffic threshold (DROTH): When the bit is set to1, it indicates that a report is reported when a quantity of droppeddownlink traffic reaches the threshold;

Bit 8—linked usage reporting (LIUSA) event: When the bit is set to 1, itindicates that a linked usage report is reported. For example, when alinked usage reporting rule initiates usage reporting, a usage reportingrequest according to the usage reporting rule needs to be triggered atthe same time.

Encoding of an octet 6 may be as follows:

Bit 1—volume quota (VOLQU): When the bit is set to 1, it indicates thata report is reported when the volume quota is exhausted;

Bit 2—time quota (TIMQU): When the bit is set to 1, it indicates that areport is reported when the time quota is exhausted;

Bit 3—envelope closure (ENVCL): When the bit is set to 1, it indicatesthat a report is reported when an envelope closure condition is met;

Bit 4—MAC addresses reporting (MACAR): When the bit is set to 1, itindicates that a report is reported when the MAC (Ethernet) address isused as a source address of an uplink (UL) data frame sent by UE;

Bit 5—event threshold (EVETH): When the bit is set to 1, it indicatesthat a report is reported when the event threshold is reached;

Bit 6—event quota (EVEQU): When the bit is set to 1, it indicates that areport is reported when the event quota is reached;

Bit 7—rerouting of traffic (RERT): When the bit is set to 1, itindicates that a report is reported when a rerouting SDF or anapplication service is detected;

Bit 8—This bit is reserved for future use and set to 0.

Step S703: The PSA-UPF1 sends a session creation response message 1 tothe SMF.

Step S704: The SMF sends the session creation response message to theterminal.

Step S705: The terminal initiates service access.

Step S706: The PSA-UPF1 monitors the service packet according to thePDR.

For example, if the PSA-UPF1 detects the preset service packet thatmatches the PDI in the PDR, the PSA-UPF1 performs step S707.

Step S707: The PSA-UPF1 sends the session report request message to theSMF.

For example, when detecting the preset service packet that matches thePDI in the PDR, the PSA-UPF1 sends the session report request message tothe SMF according to the URR in the PDR (including reporting triggersthat indicate service rerouting), where the session report requestmessage carries the user plane rerouting trigger information.

TABLE 3 A schematic table showing a structure of a usage report (UsageReport) IE in the session report request message Octets 1 and 2 UsageReport IE type = 80 (decimal) Octets 3 and 4 Length = n OptionalInterface IE or mandatory Condition Sxa Sxb Sxc N4 IE type URR IDMandatory This IE identifies a URR of X X X X URR ID reported usage.UR-SEQN Mandatory This IE indicates a X X X X UR-SEQN Usage sequencenumber of a report - usage report IE triggered session by a usagereporting rule in sequence a session. number Usage Mandatory This IEindicates a cause X X X X Usage report that triggers usage reporttrigger reporting. trigger cause cause

As shown in Table 3, the usage report trigger cause is used to indicatea cause that triggers usage reporting. In this embodiment of thisapplication, a traffic rerouting trigger cause, or referred to as userplane rerouting trigger information, is added. A specific format of theusage report trigger cause may be shown in Table 4. When a bit 2—RERT ofan octet 7 is set to 1, it indicates that a rerouting service flow isdetected (that is, the rerouting traffic trigger cause or the user-planererouting triggering information).

TABLE 4 A schematic table showing a structure of the usage reporttrigger cause Bit Octets 8 7 6 5 4 3 2 1 1 to 2 Type = 63 (decimal) 3 to4 Length = n 5 IMMER DROTH STOPT START QUHTI TIMTH VOLTH PERIO 6 EVETHMACAR ENVCL MONIT TERMR LIUSA TIMQU VOLQU 7 Spare Spare Spare SpareSpare Spare RERT EVEQU 8 to These octets exist only when explicitlyspecified. (n + 4)

The octet 5 may be encoded as follows:

Bit 1—PERIO: When the bit is set to 1, it indicates a periodic report;

Bit 2—VOLTH: When the bit is set to 1, it indicates that the data usagereaches the usage threshold;

Bit 3—TIMTH: When the bit is set to 1, it indicates that the time usagereaches the time threshold;

Bit 4—QUHTI: When the bit is set to 1, it indicates that no data packetis received within the time period exceeding the quota holding time;

Bit 5—START: When the bit is set to 1, it indicates that a service isstarted;

Bit 6—STOPT: When the bit is set to 1, it indicates that the service isstopped;

Bit 7—DROTH: When the bit is set to 1, it indicates that a quantity ofdiscarded downlink traffic reaches the threshold;

Bit 8—immediate report (IMMER) (it indicates that URR reporting istriggered immediately after a message is received from a CP): If the bitis set to 1, it indicates that an immediate usage report request istriggered based on a demand of the CP function entity.

The octet 6 may be encoded as follows:

Bit 1—VOLQU: When the bit is set to 1, it indicates that the volumequota is exhausted;

Bit 2—TIMQU: When the bit is set to 1, it indicates that the time quotais exhausted;

Bit 3—LIUSA: When the bit is set to 1, it indicates a linked usage areport is reported. For example, a usage report is reported according toa usage reporting rule because a usage report is reported according to alinked usage reporting rule;

Bit 4—termination report (TERMR): When the bit is set to 1, it indicatesthat a usage report is reported (in a PFCP session delete response) dueto termination of a PFCP session, or a usage report is reported (in aPFCP session modification response) because the URR is removed;

Bit 5—monitoring time (MONIT): When the bit is set to 1, it indicatesthat a usage report is reported according to the URR because themonitoring time is reached;

Bit 6—ENVCL: When the bit is set to 1, it indicates that a usage reportis generated when an envelope is closed;

Bit 7—MACAR: When the bit is set to 1, it indicates usage reporting isinitiated when the MAC (Ethernet) address is used as the source addressof an uplink (UL) data frame sent by the UE;

Bit 8—EVETH: When the bit is set to 1, it indicates that the usagereport is generated when the event threshold is reached.

The octet 7 may be encoded as follows:

Bit 1—EVEQU: When the bit is set to 1, it indicates that the event quotais exhausted;

Bit 2—RERT: When the bit is set to 1, it indicates that the reroutingSDF or the application service is detected;

Bits 3 to 8: These bits are reserved for future use and set to 0.

Step S708: The SMF sends a session report response message to thePSA-UPF1.

Step S709: The SMF determines, based on the user plane rerouting triggerinformation in the session report request message, that the user planererouting needs to be performed.

For example, the SMF determines, based on the user plane reroutingtriggering information in the session report request message, that thepreset service for which the session needs to be created between the UPFperforming traffic steering and the PSA-UPF2 and to which a servicepacket traffic steering rule is delivered has been triggered, andtherefore the user plane rerouting needs to be performed.

Step S710: The SMF sends a session creation request message 2 to thePSA-UPF2, where the session creation request message 2 is used toindicate to create a session between the SMF and the PSA-UPF2.

Step S711: The PSA-UPF2 sends a session creation response message 2 tothe SMF.

Step S712: The SMF sends a session creation request message 3 to the UPFperforming traffic steering, where the session creation request message3 is used to indicate to create a session between the SMF and the UPFthat performs traffic steering.

For example, the session creation request message 3 carries the servicepacket traffic steering rule allocated to the UPF performing trafficsteering, so that the UPF performing traffic steering distributes theservice packet by using the source anchor PSA-UPF1 and the new localanchor PSA-UPF2 according to the service packet traffic steering rule.

Step S713: The UPF performing traffic steering sends a session creationresponse message 3 to the SMF.

Step S714: The SMF sends a session update request message to thePSA-UPF1, where the session update request message is used to indicateto update the PDR in the PSA-UPF1.

For example, the session update request message is used to indicate toupdate interface tunnel information carried in an FAR action of anoriginal PDR in the PSA-UPF1 to interface tunnel information (forexample, an interface address and/or an F-TEID) between the PSA-UPF1 andthe UPF performing traffic steering.

Step S715: The PSA-UPF1 sends a session update response message to theSMF.

Step S716: The UPF performing traffic steering forwards, according tothe service packet traffic steering rule, a service packet sent by theterminal to a DN by using the PSA-UPF1 and the PSA-UPF2.

For example, the UPF performing traffic steering may distribute,according to the service packet traffic steering rule, the presetservice packet to the PSA-UPF2 for accessing a data network, and maystill forward another service packet to the PSA-UPF1 for continuing toaccess the data network.

In this embodiment of this application, the PSA-UPF 1 may monitor theservice packet according to the PDR, and send the user plane reroutingtrigger information to the SMF when detecting the preset service packetmatching the PDR. The SMF may learn, based on the user plane reroutingtriggering information, that the preset service for which the sessionneeds to be created between the UPF performing traffic steering and thePSA-UPF2 and to which the service packet traffic steering rule isdelivered has been triggered. The SMF further performs a sessioncreation procedure between the UPF performing traffic steering and thePSA-UPF2, to distribute a specific service flow to a correspondinganchor UPF for accessing the data network. It can be learned that inthis embodiment of this application, user plane path adjustment based onservice awareness can be implemented without a need to use a functionentity planned on a third-party APP to sense and trigger the user planererouting. This improves operator network security.

FIG. 8A and FIG. 8B are a schematic flowchart of a user plane reroutingmethod according to another embodiment of this application. Based on theforegoing embodiment, this embodiment of this application describes theuser plane rerouting method by using an example in which a PSA-UPF1monitors a service packet according to a PDR delivered by an SMF andsends user plane rerouting trigger information to the SMF when detectinga preset service packet matching the PDR, so that the SMF performs userplane rerouting operations of creating a session with a PSA-UPF2,deleting a session with the PSA-UPF1, and the like.

In this embodiment of this application, a policy used to trigger userplane rerouting is preset on the SMF. For example, when accessing apreset service, a terminal needs to select a specific UPF as a new localanchor PSA-UPF2 to create new session information and delete sessioninformation of a source anchor PSA-UPF1, and the like.

In this embodiment, the SMF may generate the corresponding PDR accordingto the preset policy, where the PDR may include but is not limited to:PDI and a URR.

As shown in FIG. 8A and FIG. 8B, the method in this embodiment of thisapplication may include the following steps.

Step S801: The terminal sends a session creation request message to theSMF.

Step S802: The SMF sends a session creation request message 1 to thePSA-UPF1, where the session creation request message 1 is used toindicate to create the session between the SMF and the PSA-UPF1.

For example, the session creation request message 1 carries the PDRgenerated by the SMF according to the preset policy, and the PDR mayinclude but is not limited to: the PDI and the URR.

Structures of URR information elements in the session creation requestmessage 1 are shown in Table 1 and Table 2. Details are not describedherein again.

Step S803: The PSA-UPF1 sends a session creation response message 1 tothe SMF.

Step S804: The SMF sends the session creation response message to theterminal.

Step S805: The terminal initiates service access.

Step S806: The PSA-UPF1 monitors the service packet according to thePDR.

For example, if the PSA-UPF1 detects the preset service packet thatmatches the PDI in the PDR, the PSA-UPF1 performs step S807.

Step S807: The PSA-UPF1 sends a session report request message to theSMF.

For example, when detecting the preset service packet that matches thePDI in the PDR, the PSA-UPF1 sends the session report request message tothe SMF according to the URR in the PDR (including reporting triggersthat indicate service rerouting), where the session report requestmessage carries the user plane rerouting trigger information.

A structure of a usage report IE in the session report request messageis shown in Table 3 and Table 4. Details are not described herein again.

Step S808: The SMF sends a session report response message to thePSA-UPF1.

Step S809: The SMF determines, based on the user plane rerouting triggerinformation in the session report request message, that the user planererouting needs to be performed.

For example, the SMF determines, based on the user plane reroutingtriggering information in the session report request message, that thepreset service for which the session with the PSA-UPF2 needs to becreated and the session with the PSA-UPF1 needs to be deleted has beentriggered, and therefore the user plane rerouting needs to be performed.

Step S810: The SMF sends a session creation request message 2 to thePSA-UPF2, where the session creation request message 2 is used toindicate to create the session between the SMF and the PSA-UPF2.

Step S811: The PSA-UPF2 sends a session creation response message 2 tothe SMF.

Step S812: The SMF sends a session delete request message to thePSA-UPF1, where the session delete request message is used to indicateto delete the session between the SMF and the PSA-UPF1.

Step S813: The PSA-UPF1 sends a session delete response message to theSMF.

Step S814: The PSA-UPF2 forwards a service packet sent by the terminal.

In this embodiment of this application, the PSA-UPF 1 may monitor theservice packet according to the PDR, and send user plane reroutingtrigger information to the SMF when detecting the preset service packetmatching the PDR. The SMF may learn, based on the user plane reroutingtriggering information, that the preset service for which the sessionwith the PSA-UPF2 needs to be created and the session with the PSA-UPF1needs to be deleted has been triggered. The SMF performs procedures ofcreating the session with the PSA-UPF2 and deleting the session with thePSA-UPF1. In this way, all service packets sent by the terminal access adata network by using the PSA-UPF2. It can be learned that in thisembodiment of this application, user plane path adjustment based onservice awareness can be implemented without a need to use a functionentity planned on a third-party APP to sense and trigger the user planererouting. This improves operator network security.

FIG. 9A, FIG. 9B, and FIG. 9C are a schematic flowchart of a user planererouting method according to another embodiment of this application.Based on the foregoing embodiment, this embodiment of this applicationdescribes the user plane rerouting method by using an example in which aPSA-UPF1 monitors a service packet (generated after an SMF obtains apolicy used to trigger user plane rerouting from a PCF) according to aPDR delivered by the SMF and sends user plane rerouting triggerinformation to the SMF when detecting a preset service packet matchingthe PDR, so that the SMF reports the user plane rerouting triggerinformation to the PCF and performs, after receiving indicationinformation that is sent by the PCF and that is used to indicate the SMFto perform the user plane rerouting, user plane rerouting operations ofcreating a session between a UPF performing traffic steering and aPSA-UPF2, delivering a service packet traffic steering rule, and thelike.

In this embodiment of this application, the policy used to trigger userplane rerouting is preset on the PCF. For example, when accessing apreset service, a terminal needs to select a specific UPF as the UPFperforming traffic steering to insert session information and anotherspecific UPF as a new local anchor PSA-UPF2 to create new sessioninformation, and deliver, to the UPF performing traffic steering, apolicy used to indicate to separately distribute a service flow(including a plurality of service packets) by using a source anchorPSA-UPF1 and a new local anchor PSA-UPF2, and the like.

For example, for an IPv4 session and/or a non-multi-homed IPv6 session,the UPF performing traffic steering in this embodiment of thisapplication may be a ULCL-UPF. For a multi-homed IPv6 session, the UPFperforming traffic steering in this embodiment of this application maybe a BP-UPF.

As shown in FIG. 9A, FIG. 9B, and FIG. 9C, the method in this embodimentof this application may include the following steps.

Step S901: The terminal sends a session creation request message to theSMF.

Step S902: The SMF sends a policy control creation request message tothe PCF, where the policy control creation request message is used toindicate to obtain the policy used to trigger the user plane rerouting.

Step S903: The PCF sends a policy control creation response message tothe SMF, where the policy control creation response message carries thepolicy used to trigger the user plane rerouting. Certainly, the policycontrol creation response message may further carry another policy suchas a charging and control policy.

For example, the policy control creation response message may includeindication information of a policy control request triggers cause. Asshown in Table 5, the indication information of the policy controlrequest triggers cause may include but is not limited to a reroutingpolicy (or referred to as the policy used to trigger the user planererouting) that is used to indicate the SMF to report a policy controlupdate request when detecting that the terminal accesses the presetservice for which user plane rerouting needs to be performed.

TABLE 5 A schematic table showing the indication information of thepolicy control request triggers cause Policy control request triggerscause Description Reporting condition Rerouting policy The terminalaccesses a preset service for UPF −> SMF −> PCF which user planererouting needs to be performed.

Step S904: The SMF generates the corresponding PDR according to thepolicy that is obtained from the PCF and that is used to trigger theuser plane rerouting, where the PDR may include but is not limited to:PDI and a URR.

Step S905: The SMF sends a session creation request message 1 to thePSA-UPF1, where the session creation request message 1 is used toindicate to create a session between the SMF and the PSA-UPF1.

For example, the session creation request message 1 carries the PDR, andthe PDR may include but is not limited to: the PDI and the URR.

Structures of URR information elements in the session creation requestmessage 1 are shown in Table 1 and Table 2. Details are not describedherein again.

Step S906: The PSA-UPF1 sends a session creation response message 1 tothe SMF.

Step S907: The SMF sends the session creation response message to theterminal.

Step S908: The terminal initiates service access.

Step S909: The PSA-UPF1 monitors the service packet according to thePDR.

For example, if the PSA-UPF1 detects the preset service packet thatmatches the PDI in the PDR, the PSA-UPF1 performs step S910.

Step S910: The PSA-UPF1 sends a session report request message to theSMF.

For example, when detecting the preset service packet that matches thePDI in the PDR, the PSA-UPF1 sends the session report request message tothe SMF according to the URR in the PDR (including reporting triggersthat indicate service rerouting), where the session report requestmessage carries the user plane rerouting trigger information.

A structure of a usage report (Usage Report) IE in the session reportrequest message is shown in Table 3 and Table 4. Details are notdescribed herein again.

Step S911: The SMF sends a session report response message to thePSA-UPF1.

Step S912: The SMF sends a policy control update request message to thePCF.

For example, the SMF determines, based on the user plane reroutingtriggering information in the session report request message, that thepreset service for which the session between the UPF performing trafficsteering and the PSA-UPF2 needs to be created and to which the servicepacket traffic steering rule needs to be delivered has been triggered,and sends the policy control update request message to the PCF, wherethe policy control update request message may carry the user planererouting triggering information.

Step S913: The PCF sends a policy control update response message to theSMF, where the policy control update response message may carryindication information used to indicate the SMF to perform the userplane rerouting.

Step S914: The SMF determines, based on the received indicationinformation used to indicate the SMF to perform the user planererouting, to perform the user plane rerouting.

Step S915: The SMF sends a session creation request message 2 to thePSA-UPF2, where the session creation request message 2 is used toindicate to create a session between the SMF and the PSA-UPF2.

Step S916: The PSA-UPF2 sends a session creation response message 2 tothe SMF.

Step S917: The SMF sends a session creation request message 3 to the UPFperforming traffic steering, where the session creation request message3 is used to indicate to create a session between the SMF and the UPFperforming traffic steering.

For example, the session creation request message 3 carries the servicepacket traffic steering rule allocated to the UPF performing trafficsteering, so that the UPF performing traffic steering distributes theservice packet by using the source anchor PSA-UPF1 and the new localanchor PSA-UPF2 according to the service packet traffic steering rule.

Step S918: The UPF performing traffic steering sends a session creationresponse message 3 to the SMF.

Step S919: The SMF sends a session update request message to thePSA-UPF1, where the session update request message is used to indicateto update the PDR in the PSA-UPF1.

For example, the session update request message is used to indicate toupdate interface tunnel information carried in an FAR action of anoriginal PDR in the PSA-UPF1 to interface tunnel information between thePSA-UPF1 and the UPF performing traffic steering (for example, aninterface address and/or an F-TEID).

Step S920: The PSA-UPF1 sends a session update response message to theSMF.

Step S921: The UPF performing traffic steering forwards, according tothe service packet traffic steering rule, the service packet sent by theterminal to a DN by using the PSA-UPF1 and the PSA-UPF2.

For example, the UPF performing traffic steering may distribute,according to the service packet traffic steering rule, the presetservice packet to the PSA-UPF2 for accessing the data network, and maystill forward another service packet to the PSA-UPF1 for continuing toaccess the data network.

In this embodiment of this application, the PSA-UPF 1 may monitor theservice packet according to the PDR, and send the user plane reroutingtrigger information to the SMF when detecting the preset service packetmatching the PDR. The SMF may learn, based on the user plane reroutingtriggering information, that the preset service for which the sessionneeds to be created between the UPF performing traffic steering and thePSA-UPF2 and to which the service packet traffic steering rule isdelivered has been triggered and is reported to the PCF. The SMF furtherperforms a session creation procedure between the UPF performing trafficsteering and the PSA-UPF2 after receiving the indication informationthat is sent by the PCF and that is used to indicate the SMF to performthe user plane rerouting, to distribute a specific service flow to acorresponding anchor UPF for accessing the data network. It can belearned that in this embodiment of this application, user plane pathadjustment based on service awareness can be implemented without a needto use a function entity planned on a third-party APP to sense andtrigger the user plane rerouting. This improves operator networksecurity.

FIG. 10 is a schematic diagram depicting a structure of a networkelement according to an embodiment of this application. Optionally, thenetwork element provided in this embodiment of this application may be afirst network element. As shown in FIG. 10, a network element 100 inthis embodiment of this application may include a first receiving module1001 and a rerouting module 1002.

The first receiving module 1001 is configured to receive user planererouting trigger information sent by a second network element, wherethe user plane rerouting trigger information is sent when the secondnetwork element detects a preset service packet that matches a packetdetection rule (PDR), and the PDR is used to indicate matchinginformation and an execution rule that are corresponding to presetservice packet triggering the user plane rerouting.

The rerouting module 1002 is configured to perform the user planererouting based on the user plane rerouting trigger information.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR). The PDI is used toindicate the matching information corresponding to the preset servicepacket. The URR is used to indicate the execution rule corresponding tothe preset service packet.

In a possible implementation, the first network element furtherincludes:

a first generation module, configured to generate the PDR according to apreset policy used to trigger the user plane rerouting; and

a first sending module, configured to send the PDR to the second networkelement.

In a possible implementation, the first network element furtherincludes:

an obtaining module, configured to obtain a preset policy, from a thirdnetwork element, that is in a third network element and that is used totrigger the user plane rerouting;

a second generation module, configured to generate the PDR according tothe policy; and

a second sending module, configured to send the PDR to the secondnetwork element.

In a possible implementation, the first network element furtherincludes:

a third sending module, configured to send an activation message to thesecond network element, where the activation message is used to indicateto activate the preset PDR in the second network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message sent by the first network element to the secondnetwork element, and the first session creation request message is usedto indicate to create a session between the first network element andthe second network element.

In a possible implementation, the activation message is carried in asecond session creation request message sent by the first networkelement to the second network element, and the second session creationrequest message is used to indicate to create a session between thefirst network element and the second network element.

In a possible implementation, the rerouting module 1002 is specificallyconfigured to:

send a first session request message to a fourth network element and asecond session request message to a fifth network element, where thefirst session request message is used to indicate to create or update asession between the first network element and the fourth networkelement, the second session request message is used to indicate tocreate or update a session between the first network element and thefifth network element, and the second session request message carries aservice packet traffic steering rule allocated to the fifth networkelement; and/or

send a session update request message to the second network element,where the session update request message is used to indicate to updatethe PDR in the second network element.

In a possible implementation, the rerouting module 1002 includes:

a creation unit, configured to create the session with the fourthnetwork element; and

a deletion unit, configured to delete the session with the secondnetwork element.

In a possible implementation, the creation unit is specificallyconfigured to:

send a third session creation request message to the fourth networkelement, where the third session creation request message is used toindicate to create the session between the first network element and thefourth network element.

In a possible implementation, the deletion unit is specificallyconfigured to:

send a session delete request message to the second network element,where the session delete request message is used to indicate to deletethe session between the first network element and the second networkelement.

In a possible implementation, the first network element furtherincludes:

a fourth sending module, configured to send the user plane reroutingtrigger information to the third network element; and

a second receiving module, configured to receive indication informationsent by the third network element, where the indication information isused to indicate the first network element to perform the user planererouting.

The network element 100 provided in this embodiment of this applicationmay be configured to perform technical solutions related to the firstnetwork element in the foregoing user plane rerouting method embodimentof this application. Implementation principles and technical effects ofthe network element 100 are similar to those in the method embodiments.Details are not described herein again.

FIG. 11 is a schematic diagram depicting a structure of a networkelement according to another embodiment of this application. Optionally,the network element provided in this embodiment of this application maybe a first network element. As shown in FIG. 11, a network element 110in this embodiment of this application may include a monitoring module1101 and a sending module 1102.

The monitoring module 1101 is configured to monitor a service packetaccording to a packet detection rule (PDR), where the PDR is used toindicate matching information and an execution rule that arecorresponding to a preset service packet triggering user planererouting.

The sending module 1102 is configured to send user plane reroutingtrigger information to a second network element according to theexecution rule when the monitoring module detects the preset servicepacket that matches the PDR.

In a possible implementation, the PDR includes: packet detectioninformation (PDI) and a usage reporting rule (URR). The PDI is used toindicate the matching information corresponding to the preset servicepacket. The URR is used to indicate the execution rule corresponding tothe preset service packet.

In a possible implementation, the monitoring module 1101 is specificallyconfigured to:

determine attribute information of the service packet;

match the attribute information with the PDI;

if the attribute information matches the PDI, detect that the servicepacket is the preset service packet that matches the PDR; and/or

if the attribute information does not match the PDI, detect that theservice packet is not the preset service packet that matches the PDR.

In a possible implementation, the first network element furtherincludes:

a first receiving module, configured to receive the PDR sent by thesecond network element, where the PDR is generated by the second networkelement according to a preset policy used to trigger the user planererouting, or the PDR is generated after the second network elementobtains a policy used to trigger the user plane rerouting from a thirdnetwork element.

In a possible implementation, the first network element furtherincludes:

a second receiving module, configured to receive an activation messagesent by the second network element, where the activation message is usedto indicate to activate the preset PDR in the first network element.

In a possible implementation, the PDR is carried in a first sessioncreation request message received by the first network element from thesecond network element, and the first session creation request messageis used to indicate to create a session between the second networkelement and the first network element.

In a possible implementation, the activation message is carried in asecond session creation request message received by the first networkelement from the second network element, and the second session creationrequest message is used to indicate to create a session between thesecond network element and the first network element.

In a possible implementation, the first network element furtherincludes:

a third receiving module, configured to receive a session update requestmessage sent by the second network element, where the session updaterequest message is used to indicate to update the PDR in the firstnetwork element.

In a possible implementation, the first network element furtherincludes:

a fourth receiving module, configured to receive a session deleterequest message sent by the second network element, where the sessiondelete request message is used to indicate to delete the session betweenthe second network element and the first network element.

The network element 100 provided in this embodiment of this applicationmay be configured to perform technical solutions related to the secondnetwork element in the foregoing user plane rerouting method embodimentof this application. Implementation principles and technical effects ofthe network element 100 are similar to those in the method embodiments.Details are not described herein again.

FIG. 12 is a schematic diagram depicting a structure of a networkelement according to another embodiment of this application. As shown inFIG. 12, a network element 120 in this embodiment may include aprocessor 1201 and a memory 1202. Optionally, the network element 120may further include a transceiver 1203 configured to send and receiveinformation and/or a message. The memory 1202 is configured to storeprogram instructions, the processor 1201 is configured to invoke andexecute the program instructions stored in the memory 1202. When theprocessor 1201 executes the program instructions stored in the memory1202, the network element 120 is configured to perform the technicalsolutions related to the first network element or the second networkelement in the foregoing user plane rerouting method embodiments of thisapplication. Implementation principles and technical effects thereof aresimilar to those in the method embodiments. Details are not describedherein again.

An embodiment of this application further provides a computer-readablestorage medium. The computer-readable storage medium storesinstructions. When the instructions are run on a computer, the computerperforms technical solutions related to a first network element or asecond network element in the foregoing user plane rerouting methodembodiment of this application. Implementation principles and technicaleffects thereof are similar to those in the method embodiments. Detailsare not described herein again.

An embodiment of this application further provides a chip system. Thechip system includes a processor, and may further include a memory,configured to implement technical solutions of a first network elementor a second network element in the foregoing user plane rerouting methodembodiment of this application. Implementation principles and technicaleffects thereof are similar to those in the method embodiments. Detailsare not described herein again. The chip system may include a chip, ormay include a chip and another discrete component.

An embodiment of this application further provides a program. When beingexecuted by a processor, the program is used to perform technicalsolutions related to a first network element or a second network elementin the foregoing user plane rerouting method embodiment of thisapplication. Implementation principles and technical effects thereof aresimilar to those in the method embodiments. Details are not describedherein again.

An embodiment of this application provides a computer program productthat includes instructions. When the instructions are run on a computer,the computer performs the technical solutions related to the firstnetwork element or the second network element in the foregoing userplane rerouting method embodiment of this application. Implementationprinciples and technical effects thereof are similar to those in themethod embodiments. Details are not described herein again.

In the embodiments of this application, the processor may be ageneral-purpose processor, a digital signal processor, anapplication-specific integrated circuit, a field-programmable gate arrayor another programmable logic device, a discrete gate or transistorlogic device, or a discrete hardware component, and can implement orperform the methods, steps, and logical block diagrams disclosed in theembodiments of this application. The general-purpose processor may be amicroprocessor, any conventional processor, or the like. The steps ofthe method disclosed with reference to the embodiments of thisapplication may be directly performed by a hardware processor, or may beperformed by using a combination of hardware in the processor and asoftware module.

In the embodiments of this application, the memory may be a non-volatilememory, such as a hard disk drive (HDD) or a solid-state drive (SSD), ormay be a volatile memory, such as a random-access memory (RAM). Thememory is any other medium that can be configured to carry or storeexpected program code in a form of instructions or a data structure andthat can be accessed by a computer, but is not limited thereto.

In the several embodiments provided in this application, it should beunderstood that the disclosed apparatus and method may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, division into units is merely logical functiondivision and may be other division during actual implementations. Forexample, a plurality of units or components may be combined orintegrated into another system, or some features may be ignored or notperformed. In addition, the displayed or discussed mutual couplings ordirect couplings or communication connections may be implemented throughsome interfaces. The indirect couplings or communication connectionsbetween the apparatuses or units may be implemented in electrical,mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,and may be located in one position, or may be distributed on a pluralityof network units. Some or all of the units may be selected depending onactual requirements to achieve the objectives of the solutions in theembodiments.

In addition, functional units in the embodiments of this application maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units may be integrated into one unit.The integrated unit may be implemented in a form of hardware, or may beimplemented in a form of hardware and a software functional unit.

A person of ordinary skill in the art may understand that sequencenumbers of the foregoing processes do not mean execution sequences invarious embodiments of this application. The execution sequences of theprocesses should be determined based on functions and internal logic ofthe processes, and should not constitute any limitation on theimplementation processes of the embodiments of this application.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the methods, all or some of the methods may beimplemented in a form of a computer program product. The computerprogram product includes one or more computer instructions. When thecomputer program instructions are loaded and executed on a computer, allor some of the procedures or functions according to the embodiments ofthis application are generated. The computer may be a general purposecomputer, a dedicated computer, a computer network, or anotherprogrammable apparatus. The computer instructions may be stored in acomputer-readable storage medium or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line (DSL)) or wireless (forexample, infrared, radio, or microwave) manner. The computer-readablestorage medium may be any usable medium accessible by a computer, or adata storage device, such as a server or a data center, integrating oneor more usable media. The usable medium may be a magnetic medium (forexample, a floppy disk, a hard disk, or a magnetic tape), an opticalmedium (for example, a DVD), a semiconductor medium (for example, asolid-state drive Solid State Disk (SSD)), or the like.

1. A user plane rerouting method, comprising: receiving, by a firstnetwork element, user plane rerouting trigger information sent by asecond network element, wherein the user plane rerouting triggerinformation is sent when the second network element detects a presetservice packet that matches a packet detection rule (PDR), and the PDRindicates matching information and an execution rule that corresponds tothe preset service packet triggering the user plane rerouting; andperforming, by the first network element, the user plane rerouting basedon the user plane rerouting trigger information.
 2. The method accordingto claim 1, wherein: the PDR comprises packet detection information(PDI) and a usage reporting rule (URR), the PDI indicates the matchinginformation corresponding to the preset service packet, and the URRindicates the execution rule corresponding to the preset service packet.3. The method according to claim 1, wherein the method furthercomprises: generating, by the first network element, the PDR accordingto a preset policy used to trigger the user plane rerouting; and sendingthe PDR to the second network element.
 4. The method according to claim1, wherein the method further comprises: obtaining, by the first networkelement from a third network element, a preset policy that is in thethird network element and that triggers the user plane rerouting; andgenerating, by the first network element, the PDR according to thepreset policy and sending the PDR to the second network element.
 5. Themethod according to claim 1, wherein the method further comprises:sending, by the first network element, an activation message to thesecond network element, wherein the activation message indicates toactivate a preset PDR in the second network element.
 6. The methodaccording to claim 3, wherein the PDR is carried in a first sessioncreation request message sent by the first network element to the secondnetwork element, and the first session creation request messageindicates to create a session between the first network element and thesecond network element.
 7. The method according to claim 5, wherein theactivation message is carried in a second session creation requestmessage sent by the first network element to the second network element,and the second session creation request message indicates to create asession between the first network element and the second networkelement.
 8. The method according to claim 1, wherein the performing, bythe first network element, the user plane rerouting based on the userplane rerouting trigger information comprises: sending, by the firstnetwork element, a first session request message to a fourth networkelement and a second session request message to a fifth network element,wherein the first session request message indicate-to create or update asession between the first network element and the fourth networkelement, the second session request message indicates to create orupdate a session between the first network element and the fifth networkelement, and the second session request message carries a service packettraffic steering rule allocated to the fifth network element; andsending, by the first network element, a session update request messageto the second network element, wherein the session update requestmessage indicates to update the PDR in the second network element. 9.The method according to claim 1, wherein the performing, by the firstnetwork element, the user plane rerouting based on the user planererouting trigger information comprises: creating, by the first networkelement, a session with a fourth network element; and deleting, by thefirst network element, the session with the second network element. 10.The method according to claim 9, wherein the creating, by the firstnetwork element, the session with the fourth network element comprises:sending, by the first network element, a third session creation requestmessage to the fourth network element, wherein the third sessioncreation request message indicates to create the session between thefirst network element and the fourth network element.
 11. A user planererouting method, comprising: monitoring, by a first network element, aservice packet according to a packet detection rule (PDR), wherein thePDR indicates matching information and an execution rule thatcorresponds to a preset service packet triggering user plane rerouting;and if the first network element detects the preset service packet thatmatches the PDR, sending, by the first network element, user planererouting trigger information to a second network element according tothe execution rule.
 12. The method according to claim 11, wherein thePDR comprises packet detection information (PDI) and a usage reportingrule (URR), wherein the PDI indicates the matching informationcorresponding to the preset service packet, and wherein the URRindicates the execution rule corresponding to the preset service packet.13. The method according to claim 12, wherein the monitoring, by thefirst network element, the service packet according to the PDRcomprises: determining, by the first network element, attributeinformation of the service packet; matching, by the first networkelement, the attribute information with the PDI; if the attributeinformation matches the PDI, the service packet detected by the firstnetwork element is the preset service packet that matches the PDR; andif the attribute information does not match the PDI, the service packetdetected by the first network element is not the preset service packetthat matches the PDR.
 14. The method according to claim 11, wherein themethod further comprises: receiving, by the first network element, thePDR sent by the second network element, wherein the PDR is generated bythe second network element according to a preset policy used to triggerthe user plane rerouting, or the PDR is generated after the secondnetwork element obtains a policy used to trigger the user planererouting from a third network element.
 15. The method according toclaim 11, wherein the method further comprises: receiving, by the firstnetwork element, an activation message sent by the second networkelement, wherein the activation message indicates to activate the presetPDR in the first network element.
 16. The method according to claim 14,wherein the PDR is carried in a first session creation request messagereceived by the first network element from the second network element,and the first session creation request message indicates to create asession between the second network element and the first networkelement.
 17. The method according to claim 15, wherein the activationmessage is carried in a second session creation request message receivedby the first network element from the second network element, and thesecond session creation request message indicates to create a sessionbetween the second network element and the first network element.
 18. Anetwork element, wherein the network element is a first network element,and the first network element comprises: a receiver; and a processor,wherein: the receiver is configured to receive user plane reroutingtrigger information sent by a second network element, wherein the userplane rerouting trigger information is sent when the second networkelement detects a preset service packet that matches a packet detectionrule (PDR), and the PDR indicates matching information and an executionrule corresponding to the preset service packet triggering the userplane rerouting; and the processor is configured to perform the userplane rerouting based on the user plane rerouting trigger information.19. The first network element according to claim 18, wherein the PDRcomprises packet detection information (PDI) and a usage reporting rule(URR), wherein the PDI indicates the matching information correspondingto the preset service packet, and wherein the URR indicates theexecution rule corresponding to the preset service packet.
 20. The firstnetwork element according to claim 18, wherein the first network elementfurther comprises a transmitter, wherein: the processor is furtherconfigured to generate the PDR according to a preset policy used totrigger the user plane rerouting; and the transmitter is configured tosend the PDR to the second network element.